package es.acaixa.agui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JScrollPane;

public class EditarProduto extends JFrame {

	private JPanel contentPane;
	private JTable table;
	private JButton button;
	private JTextField textField;
	private JLabel label;
	private JLabel label_1;
	private JTextField textField_1;
	private JLabel label_2;
	private JScrollPane scrollPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					EditarProduto frame = new EditarProduto();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public EditarProduto() {
		setTitle("Editar Produto");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 533, 418);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JButton btnEditar = new JButton("editar");
		btnEditar.setBounds(418, 45, 89, 23);
		contentPane.add(btnEditar);
		
		button = new JButton("buscar");
		button.setBounds(418, 11, 89, 23);
		contentPane.add(button);
		
		textField = new JTextField();
		textField.setText("nome");
		textField.setColumns(10);
		textField.setBounds(269, 12, 86, 20);
		contentPane.add(textField);
		
		label = new JLabel("nome");
		label.setBounds(213, 15, 46, 14);
		contentPane.add(label);
		
		label_1 = new JLabel("ou");
		label_1.setBounds(167, 15, 46, 14);
		contentPane.add(label_1);
		
		textField_1 = new JTextField();
		textField_1.setText("id");
		textField_1.setColumns(10);
		textField_1.setBounds(35, 12, 86, 20);
		contentPane.add(textField_1);
		
		label_2 = new JLabel("Id");
		label_2.setBounds(10, 15, 46, 14);
		contentPane.add(label_2);
		
		scrollPane = new JScrollPane();
		scrollPane.setBounds(24, 92, 425, 107);
		contentPane.add(scrollPane);
		
		table = new JTable();
		scrollPane.setViewportView(table);
		table.setModel(new DefaultTableModel(
			new Object[][] {
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
				{null, null, null, null, null, null, null, null},
			},
			new String[] {
				"id", "nome", "tipo", "disponibilidade", "tempo", "descri\u00E7\u00E3o", "pre\u00E7o", "Nota media"
			}
		) {
			Class[] columnTypes = new Class[] {
				Integer.class, String.class, String.class, Boolean.class, Object.class, String.class, String.class, Object.class
			};
			public Class getColumnClass(int columnIndex) {
				return columnTypes[columnIndex];
			}
		});
	}

}
